package com.example.springboot.controller;

import com.example.springboot.common.Result;
import com.example.springboot.service.UserService;
import com.example.springboot.entity.user;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
@Resource
    private UserService userservice;
//查询所有用户
    @GetMapping("/selectAll")
    public Result selectAll(){
        List<user>list=userservice.selectAll();
        return  Result.success(list);
    }
}
